

export default {
    state: {
      // 用户信息
      user_dict: {},
    },
    getters: {
      getUser (state) {//传入state
        return state.user_dict
      },
    },
    mutations: {
      // 传入第一个参数state, 第二个传入的数据data
      setUser (state, data) {
        state.user_dict = data;
      },

    },
    actions: {
      //传入的第一个参数是context---->获取{commit}
      setUser ({ commit }, data) {
        commit('setUser', data);
      },
    }
  }